
package com.insigma.business.qrcode.soldier.service.impl;


import com.insigma.business.qrcode.common.service.SequenceGenerator;
import com.insigma.business.qrcode.soldier.dao.SoldierOuterBasicInfoDao;
import com.insigma.business.qrcode.soldier.dto.SequenceNameConstant;
import com.insigma.business.qrcode.soldier.dto.SoldierOuterBasicInfoBSearcher;
import com.insigma.business.qrcode.soldier.entity.SoldierOuterBasicInfoDO;
import com.insigma.business.qrcode.soldier.service.SoldierOuterBasicInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


@Service("soldierOuterBasicInfoService")
public class SoldierOuterBasicInfoServiceImpl implements SoldierOuterBasicInfoService {

    @Autowired(required = false)
    private SoldierOuterBasicInfoDao soldierOuterBasicInfoDao;
    @Autowired(required = false)
    private SequenceGenerator sequenceGenerator;

    
    @Override
    public List<SoldierOuterBasicInfoDO> search(final SoldierOuterBasicInfoBSearcher soldierOuterBasicInfoBSearcher) {
        return soldierOuterBasicInfoDao.search(soldierOuterBasicInfoBSearcher);
    }
   
    @Override
    public SoldierOuterBasicInfoDO get(final String id){
        return soldierOuterBasicInfoDao.get(id);
    }

    
    @Override
    public Integer insert(final SoldierOuterBasicInfoDO soldierOuterBasicInfoDO){
        soldierOuterBasicInfoDO.setId(sequenceGenerator.genKey(SequenceNameConstant.SOLDIER_OUTER_BASIC_INFO_ID));
        return soldierOuterBasicInfoDao.insert(soldierOuterBasicInfoDO);
    }

    
    @Override
    public Integer update(final SoldierOuterBasicInfoDO soldierOuterBasicInfoDO){
        return soldierOuterBasicInfoDao.update(soldierOuterBasicInfoDO);
    }

    
    @Override
    public Integer delete(final String id, final String modifierType, final String modifierId){
        return soldierOuterBasicInfoDao.delete(id,modifierType,modifierId);
    }

    @Override
    public SoldierOuterBasicInfoDO getBySoldierId(String soldierId) {
        return soldierOuterBasicInfoDao.getBySoldierId(soldierId);
    }

    @Override
    public Integer deleteByIdCardNo(String idCardNo) {
        return soldierOuterBasicInfoDao.deleteByIdCardNo(idCardNo);
    }


}
